package net.wicp.tams.common.binlog.self.bean;

import lombok.Data;

/***
 * 离线解析任务
 * 
 * @author zhoujunhui
 *
 */
@Data
public class TaskOffline extends Task {
	private String gtidBegin;
	private String gtidEnd;
	private String binlogFiles;
	private String onlineTaskId;
	private String hostId;// rds主机的Id
	private String dbSample;// 用于查cols的db
	private String tbSample;// 用于查cols的tb
	private String cols;// 列名排列，逗号隔开

	@Override
	public String toString() {
		String superstring = super.toString();
		int end = superstring.lastIndexOf(")");
		String curstr = ",gtidBegin=" + getGtidBegin() + ",gtidEnd" + getGtidEnd() + ",binlogFiles=" + getBinlogFiles()
				+ ",dbSample=" + getDbSample() + ",tbSample=" + getTbSample() + ",onlineTaskId=" + getOnlineTaskId()
				+ ",cols=" + getCols() + ",hostId=" + getHostId();
		String retstr = superstring.substring(0, end) + curstr + ")";
		return retstr.replaceFirst("Task", "TaskOffline");
	}
}
